package com.xindacloud.sms.console.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xindacloud.sms.console.result.Result;
import com.xindacloud.sms.console.system.dto.*;
import com.xindacloud.sms.console.system.entity.SmsUserAllowOperator;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 授权给用户的短信通道 服务类
 * </p>
 *
 * @author czc
 * @since 2019-10-08
 */
public interface ISmsUserAllowOperatorService extends IService<SmsUserAllowOperator> {


    boolean updateUserAllowOperator(Integer userId, List<String> operatorIds, Boolean status, Integer operatorUserId);

    Result importPriceExcel(MultipartFile file, String agentId, String agentGroup);

    void downloadAllPrice(HttpServletRequest request, HttpServletResponse response, SmsUserAllowOperatorDTO smsUserAllowOperatorDTO);

    Result uploadAllPrice(MultipartFile file, Integer userId, Integer operatorUserId);

    Result updateBatchPrice(SmsUpdatePricingDTO smsUpdatePricingDTO);


    boolean saveSmsUserAllowOperatorBatch(List<SmsUserAllowOperator> userAllowOperatorList);

    boolean deleteUserAllowOperatorByUserId(Integer userId);

    boolean updateSmsUserAllowBatch(List<SmsUserAllowOperator> userAllowOperatorList);

    List<SmsUserAllowOperator> querySmsUserAllowOperatorList(List<String> operatorIds, Integer userId);

    Result updateUserPrice(SmsUserAllowOperatorDTO smsUserAllowOperatorDTO);


    boolean updateStatusByOperatorIds(List<String> operatorIds, Boolean status);

    Result importUserPriceExcel(MultipartFile file, Integer userId);

    boolean updateUserAllAllowOperator(SearchSmsPricingDTO searchSmsPricingDTO);

    Result deleteUserPrice(SmsUpdatePricingDTO smsUpdatePricingDTO);

    public Integer getRole(Integer userId);


    List<SmsUserAllowOperator> queryUserAllowOperatorByParentId(Integer parentId, QueryPricingByConditionsDTO queryPricingByConditionsDTO);

    Result updateSpecialOfferStatus(SmsUserAllowOperatorDTO smsUserAllowOperatorDTO);

    boolean updateStatusByAgentIds(SmsAgentDTO smsAgentDTO);

    Result updatePriceRelation(SmsUserAllowOperatorDTO smsUserAllowOperatorDTO);

    Result updateUserAllPrice(SmsUserAllowOperatorDTO smsUserAllowOperatorDTO);

    boolean updateDisplayCurrencyById(Integer userId, String currency);


    boolean updateUserAllowOperatorFor(UpdatePriceByCountryDTO priceByCountryDTO);

}
